#ifndef OPERATION_DIALOG_H
#define OPERATION_DIALOG_H

#include <QDialog>
#include <QtGui>
#include "src/scene.h"
#include "combinedObject.h"
#include "objectTreeItem.h"

class OperationDialog : public QDialog{
    Q_OBJECT

    public:
        OperationDialog(CombinedObject *, ObjectTreeItem *, QTreeWidgetItem *, Scene *, QWidget * = 0);
        ~OperationDialog();

    signals:
        void redoOctree(std::vector<Object *>);
        void redoOctree(Object *);
        void rotateOctree(Object *, int, int, int);

    private:
        CombinedObject *combinedObject;
        ObjectTreeItem *item;
        QTreeWidgetItem *root;
        Scene *scene;
        bool onlyRotated, rotated;
        bool onlyChangedColor;
        int operation, colorR, colorG, colorB, colorAlpha, rotationX, rotationY, rotationZ;
        bool remove;

        QGroupBox *operationBox;
        QPushButton *colorPushButton;

        void createLayout();
        void setButtonColor();

    private slots:
        void change();
        void changeColor();
        void changeOperation(int);
        void removeOperation(bool);
        void changeRotationX(int);
        void changeRotationY(int);
        void changeRotationZ(int);
};

#endif

